package com.cskaoyan.controller;

import com.cskaoyan.bean.vo.BaseRespVo;
import com.cskaoyan.bean.vo.UserListVo;
import com.cskaoyan.service.UserService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Fantasylkh
 */
@RequestMapping("/admin/user")
@RestController
public class UserController {

    @Autowired
    UserService userService;


    @RequiresPermissions("admin:user:list")
    @RequestMapping("/list")
    public BaseRespVo list(String username, String mobile,Integer page,Integer limit,String sort,String order){
        UserListVo userListVo = userService.queryUserList(username,mobile,page,limit,sort,order);
        return BaseRespVo.success(userListVo);
    }
}
